home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14175 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Vector Graphics
  5. Date: 11 Apr 1996 22:56:02 -0700
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4kkr9iINN6ha@keats.ugrad.cs.ubc.ca>
  8. References: <4kgoa9$i12@sue.cc.uregina.ca>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <4kgoa9$i12@sue.cc.uregina.ca>,
  12. Chris Gerber <ibp2@leroy.cc.uregina.ca> wrote:
  13.  >Hello, I'm trying to do vector (3d) graphics, and I have all the math for
  14.  >doing transformations and shading and whatnot, but it all uses x,y,z
  15.  >addressing, which is fine, but I need to find a way to convert a vector
  16.  >into an x,y screen co-ordinate so I can draw it.  If anyone has some math
  17.  >algorythm for that, or a function like:
  18.  > 
  19.  >void vector2point(VECTOR *p3d, int *x, int *y)
  20.  
  21.  
  22. {
  23.     /* the easiest projection is this:     */
  24.  
  25.     *x = p3d->x;
  26.     *y = p3d->y;
  27. }
  28.  
  29.  
  30. If you want something more sophisticated, ask in a pertinent newsgroups.
  31. Vector transformations, linear or otherwise, don't belong in a C discussion.
  32. Take a linear algebra course or something.
  33. -- 
  34.  
  35.